import { developmentUrl } from "../config/env";
import request from "../config/axios";

//表格数据 /sys/express/list?page=1&limit=20
export const sysexpresslist = (data) => request({
    url: `${developmentUrl}/sys/express/list?page=${data.page}&limit=${data.limit}`,
    method: "GEt"
})
//添加 /sys/express?name=123&code=123&disabled=false&sort=0&id=
export const sysexpress = (data) => request({
    url: `${developmentUrl}/sys/express?name=${data.name}&code=${data.code}&disabled=${data.disabled}&sort=${data.sort}&id=${data.id}`,
    method: "POST"
})
// 滑块 /sys/express/changeDisabled?id=1&disabled=true
export const changeDisabled = (data) => request({
    url: `${developmentUrl}/sys/express/changeDisabled?id=${data.id}&disabled=${data.disabled}`,
    method: "POST"
})
//删除 /sys/express?id=20
export const sysexpressDelete = (data) => request({
    url: `${developmentUrl}/sys/express?id=${data.id}`,
    method: "DELETE"
})